<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../vue.js"></script>
</head>

<body>
    <div class="app">
        <h5>{{vuea}}</h5>
        <input type="text" placeholder="按下键盘执行信息" @keyup="showInfo">
        <br>
        <!-- 按下事件 
            还有delete esc space tab(keydown) up down left right ctrl(keydown) alt(keydown) shift(keydown) Meta(keydown)
        -->
        <input type="text" placeholder="按下回车执行事件" @keyup.enter="showInfo">
        <br>
        <input type="text" placeholder="按下执行事件" @keyup.right="showInfo">
        <br>
        <input type="text" placeholder="按下执行事件" @keyup.esc="showInfo">
        <br>
        <input type="text" placeholder="按下执行事件" @keydown.tab="showInfo">
        <br>
        <input type="text" placeholder="按下执行事件" @keydown.meta="showInfo">
        <br>
        <input type="text" placeholder="按下执行事件" @keydown.meta.ctrl="showInfo">
    </div>
    <script>
        const vm = new Vue({
            data() {
                return {
                    vuea: '你好'
                }
            },
            methods: {
                showInfo() {
                    // console.log(event);
                    console.log(event.target.value);
                }
            }
        })
        vm.$mount('.app')
    </script>
</body>

</html>